package com.newtouch.xcd.cms.service.impl;

import com.newtouch.xcd.cms.to.crm.CrmData;
import com.newtouch.xcd.cms.to.crm.CrmFinancialProductData;
import com.newtouch.xcd.common.to.CommonResult;
import com.newtouch.xcd.mft.vo.CrmBookFundProductReq;
import com.newtouch.xcd.mft.vo.CrmQueryDetailsOfFamilyTrustTransactionsReq;
import com.newtouch.xcd.mft.vo.CrmQueryFinancialProductsReq;
import org.springframework.http.MediaType;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Map;

/**
 * CRM系统接口
 */
@Component
public interface FeignCrmService {

    /**
     * 1.1.01查询交易明细
     * 此接口根据CRM系统中的交易记录统计报表页面设计。
     */
    @PostMapping(value = "/openapi.php", consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE)
    CommonResult<CrmData> queryDetailsOfFamilyTrustTransactions(CrmQueryDetailsOfFamilyTrustTransactionsReq req
            , @RequestHeader(name = "token") String token
            , @RequestParam(name = "m") String m
            , @RequestParam(name = "a") String a);

    /**
     * 1.2.01查询理财产品
     */
    @PostMapping(value = "/openapi.php", consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE)
    CommonResult<CrmFinancialProductData> queryFinancialProducts(CrmQueryFinancialProductsReq req
            , @RequestHeader(name = "token") String token
            , @RequestParam(name = "m") String m
            , @RequestParam(name = "a") String a);

    /**
     * 1.3.01基金产品预约
     */
    @PostMapping(value = "/openapi.php", consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE)
    CommonResult<CrmFinancialProductData> bookFundProduct(CrmBookFundProductReq req
            , @RequestHeader(name = "token") String token
            , @RequestParam(name = "m") String m
            , @RequestParam(name = "a") String a);

}
